home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3266 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  859 b 

  1. Path: news.cencom.net!ns!tanp
  2. From: tanp@ns (Bill Wendling)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Unsigned char (How to print it)
  5. Date: 27 Jan 1996 06:18:36 GMT
  6. Organization: Cen-Com Internet
  7. Message-ID: <4ecg3s$lqm@news.cencom.net>
  8. References: <4e8qq9$9ar@sunqbc.risq.net>
  9. NNTP-Posting-Host: ns.cencom.net
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Benoit_Cavannagh inexplicably wrote:
  13. } Does someboday can show me how to print a unsigned char with printf,
  14. } it's because I want to print the time with the interruption.
  15.  
  16. To print out a character using printf, the format is:
  17.  
  18.     printf("x = %c\n", x);
  19.  
  20. where x is the unsigned character (or even just a regular character).
  21.  
  22. --
  23. Bill Wendling         | "Pinky, are you thinking what I'm thinking?"
  24. tanp@ns.cencom.net  | "I think so, Brain, but burlap chafes me so."
  25. "Boom Shanka"       | Finger me for my Geek Code...NOW!
  26.